package robocup.component.speechacts.coachlanguage;

public class PointArith {

  private String     op              = "";

  private CPoint     point           = null;

  private PointArith pointArithLeft  = null;

  private PointArith pointArithRight = null;

  public CPoint getPoint() {

    return this.point;
  }

  public void setPoint(final CPoint point) {

    this.point = point;
  }

  public PointArith getPointArithLeft() {

    return this.pointArithLeft;
  }

  public void setPointArithLeft(final PointArith pointArithLeft) {

    this.pointArithLeft = pointArithLeft;
  }

  public PointArith getPointArithRight() {

    return this.pointArithRight;
  }

  public void setPointArithRight(final PointArith pointArithRight) {

    this.pointArithRight = pointArithRight;
  }

  public String getOp() {

    return this.op;
  }

  public void setOp(final String op) {

    this.op = op;
  }

  @Override
  public String toString() {

    final StringBuffer buf = new StringBuffer();

    if (this.point != null) {
      buf.append(this.point.toString());
    }
    if (this.pointArithLeft != null) {
      buf.append(this.pointArithLeft.toString());
    }
    if (this.pointArithRight != null) {
      buf.append(" " + this.op + " ");
      buf.append(this.pointArithRight.toString());
    }

    return buf.toString();
  }

}
